Do not keep HINSTANCE variables around
authorLuca Bacci <luca.bacci982@gmail.com>
Thu, 23 Mar 2023 15:27:17 +0000 (16:27 +0100)
committerLuca Bacci <luca.bacci982@gmail.com>
Tue, 30 May 2023 17:31:54 +0000 (19:31 +0200)
commit1a058a41c9115681b834b2b4de519a4b43dfe534
treec4d478031382200fe48103b6f900db9bb9dd06ed
parentb520a5cedaefb7ee3122001ad25663c39eab505d
Do not keep HINSTANCE variables around

Use &__ImageBase for the GTK DLL and GetModuleHandle (NULL)
for the application module. Then remove DllMain as it's not
necessary anymore.

References:

 [1] Accessing the current module's HINSTANCE from a static library:
     https://devblogs.microsoft.com/oldnewthing/20041025-00/?p=37483
13 files changed:
gdk/win32/gdkclipdrop-win32.c
gdk/win32/gdkcursor-win32.c
gdk/win32/gdkdisplay-win32.c
gdk/win32/gdkevents-win32.c
gdk/win32/gdkglcontext-win32-wgl.c
gdk/win32/gdkglobals-win32.c
gdk/win32/gdkinput-winpointer.c
gdk/win32/gdkmain-win32.c
gdk/win32/gdkprivate-win32.h
gdk/win32/gdksurface-win32.c
gdk/win32/gdkvulkancontext-win32.c
gtk/gtkprintoperation-win32.c
gtk/gtkwin32.c